#ifndef __RaspiCamCV__
#define __RaspiCamCV__

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {	NO_ERROR, BUFFER_NULL, NO_STATE, BUFFER_TO_ENCODER, 
		FAILED_TO_CREATE_CAMERA, NO_OUTPUT_PORTS_CAMERA, 
		VIDEO_FORMAT_SET, SET_FORMAT_CAMERA, BUFFER_HEADER_FAILED_VIDEO,
		NOT_ENABLED_CAMERA, UNABLE_TO_GET_BUFFER, 
		FAILED_TO_START_CAPTURE_CAMERA, UNABLE_TO_SEND_BUFFER,
		VIDEO_CALLBACK2_CAMERA} RaspiCamError;

typedef struct _RASPIVID_STATE RASPIVID_STATE;

typedef struct {
	RASPIVID_STATE * pState;
} RaspiCamCvCapture;

typedef struct _IplImage IplImage;

RaspiCamCvCapture * raspiCamCvCreateCameraCapture(int index);
void raspiCamCvReleaseCapture(RaspiCamCvCapture ** capture);
void raspiCamCvSetCaptureProperty(RaspiCamCvCapture * capture, int property_id, double value);
IplImage * raspiCamCvQueryFrame(RaspiCamCvCapture * capture);


const char * RaspiCamErrorMessage(RaspiCamCvCapture * capture);
char isRaspiCamError(RaspiCamCvCapture * capture);
#ifdef __cplusplus
}
#endif

#endif
